package com.project.service;

import com.project.entity.Role;

import java.util.List;

/**
 * @Author: TateBrown
 * @date: 2018/5/26 14:57
 * @param:
 * @return:
 */
public interface RoleService {
    /**
     * author: WheelChen
     * date: 2017/11/5
     * function: 添加单条角色表记录
     *
     * @param role
     * @return
     */
    int addOne(Role role);

    /**
     * author: WheelChen
     * date: 2017/11/5
     * function: 根据id删除单条记录
     *
     * @param id 角色表主键
     * @return
     */
    int removeOneById(Integer id);

    /**
     * author: WheelChen
     * date: 2017/11/5
     * function: 根据id修改单条记录
     *
     * @param role
     * @return
     */
    int modifyOneById(Role role);

    /**
     * author: WheelChen
     * date: 2017/11/5
     * function: 根据条件模糊查找
     *
     * @param role
     * @return
     */
    List<Role> findBatchByCondition(Role role);

    /**
     * author: WheelChen
     * date: 2017/11/7
     * function: 根据主键批量删除角色并删除角色资源表/用户角色表相应记录
     *
     * @param idList
     * @return
     */
    int removeBatchByIdList(List idList);

    /**
     * author: WheelChen
     * date: 2017/11/7
     * function: 根据主键查找单个角色
     *
     * @param id
     * @return
     */
    Role findOneById(Integer id);
}
